package com.vy.stl.service;

import com.github.pagehelper.PageInfo;
import com.vy.stl.entity.Member;

import java.util.List;

/**
 * @create: 2025/08/29 13:45
 * @description:
 */
public interface MemberService {

    /**
     * 条件查询
     * @param member
     * @return
     */
    List<Member> search(Member member);

    /**
     * 条件查询
     * @param page 分页
     * @param limit
     * @param member
     * @return
     */
    PageInfo searchByPage(Integer page, Integer limit, Member member);

    /**
     * 添加会员
     * @param member
     * @return
     */
    int add(Member member) throws Exception;

    /**
     * 修改会员信息
     * @param member
     * @return
     */
    int edit(Member member) throws Exception;

    /**
     * 根据id删除会员
     * @param id
     * @return
     */
    int remove(Integer id) throws Exception;

    /**
     * 根据手机号查询会员信息
     * @param phone
     * @return
     */
//    Member getByPhone(String phone);
    Member getMemberByPhone(String phone);

    /**
     * 会员登录
     * @param member
     * @return
     */
    Member login(Member member) throws Exception;
}
